<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../../commons/taglibs.jsp"%>
<%@ include file="../../commons/list.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta charset="utf-8">
  <title>汽车坐位配置详情</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <style type="text/css">
  	.layui-input{
  		width: 150px;
  	}
  	.layui-form-pane .layui-form-label{
  		width: 160px;
  	}
  </style>
</head>

<body>
<div>
	<div style="padding: 100px;padding-top: 0px">
		<form class="layui-form layui-form-pane"  action="">
			<input type="hidden" id='entityId' name='entityId' value="${carDetailMediaConfig.id }">
			<input type="hidden" name='carmodelid' value="${carmodelid }">
			
	   		 <div class="layui-form-item">
			     <label class="layui-form-label">GPS导航系统</label>
			     <div class="layui-input-inline">
			         <input type="text" name="gps" id='gps' placeholder="请输入真皮/仿皮座椅" value="${carDetailMediaConfig.gps }" class="layui-input">
			     </div>
			     
			     <label class="layui-form-label">定位互动服务</label>
			     <div class="layui-input-inline">
			         <input type="text" name="orientationofinteraction" id='orientationofinteraction' placeholder="请输入定位互动服务" value="${carDetailMediaConfig.orientationofinteraction }" class="layui-input">
			     </div>
			 </div>
			 
	   		 <div class="layui-form-item">
			     <label class="layui-form-label">中控台彩色大屏</label>
			     <div class="layui-input-inline">
			         <input type="text" name="consolescreen" id='consolescreen' placeholder="请输入中控台彩色大屏" value="${carDetailMediaConfig.consolescreen }" class="layui-input">
			     </div>
			     
			     <label class="layui-form-label">内置硬盘</label>
			     <div class="layui-input-inline">
			         <input type="text" name="harddrive" id='harddrive' placeholder="请输入内置硬盘" value="${carDetailMediaConfig.harddrive }" class="layui-input">
			     </div>
			 </div>
			 
	   		 <div class="layui-form-item">
			     <label class="layui-form-label">蓝牙/车载电话</label>
			     <div class="layui-input-inline">
			         <input type="text" name="bluetoothphone" id='bluetoothphone' placeholder="请输入蓝牙/车载电话" value="${carDetailMediaConfig.bluetoothphone }" class="layui-input">
			     </div>
			     
			     <label class="layui-form-label">车载电视</label>
			     <div class="layui-input-inline">
			         <input type="text" name="tv" id='tv' placeholder="请输入内置硬盘" value="${carDetailMediaConfig.tv }" class="layui-input">
			     </div>
			 </div>
			 
	   		 <div class="layui-form-item">
			     <label class="layui-form-label">后排液晶屏</label>
			     <div class="layui-input-inline">
			         <input type="text" name="rearlcdscreen" id='rearlcdscreen' placeholder="请输入后排液晶屏" value="${carDetailMediaConfig.rearlcdscreen }" class="layui-input">
			     </div>
			     
			     <label class="layui-form-label">外接音源接口(AUX/USB/iPod等)</label>
			     <div class="layui-input-inline">
			         <input type="text" name="externalsoundsource" id='externalsoundsource' placeholder="请输入外接音源接口(AUX/USB/iPod等)" value="${carDetailMediaConfig.externalsoundsource }" class="layui-input">
			     </div>
			 </div>
			 
	   		 <div class="layui-form-item">
			     <label class="layui-form-label">CD支持MP3/WMA</label>
			     <div class="layui-input-inline">
			         <input type="text" name="aux" id='aux' placeholder="请输入CD支持MP3/WMA" value="${carDetailMediaConfig.aux }" class="layui-input">
			     </div>
			     
			     <label class="layui-form-label">多媒体系统</label>
			     <div class="layui-input-inline">
			         <input type="text" name="cd" id='cd' placeholder="请输入多媒体系统" value="${carDetailMediaConfig.cd }" class="layui-input">
			     </div>
			 </div>
			 
	   		 <div class="layui-form-item">
			     <label class="layui-form-label">扬声器品牌</label>
			     <div class="layui-input-inline">
			         <input type="text" name="multimediasystem" id='multimediasystem' placeholder="请输入扬声器品牌" value="${carDetailMediaConfig.multimediasystem }" class="layui-input">
			     </div>
			     
			     <label class="layui-form-label">多媒体系统</label>
			     <div class="layui-input-inline">
			         <input type="text" name="speakerbrand" id='speakerbrand' placeholder="请输入多媒体系统" value="${carDetailMediaConfig.speakerbrand }" class="layui-input">
			     </div>
			 </div>
			 
	   		 <div class="layui-form-item">
			     <label class="layui-form-label">扬声器数量</label>
			     <div class="layui-input-inline">
			         <input type="text" name="loundspeakersnum" id='loundspeakersnum' placeholder="请输入扬声器数量" value="${carDetailMediaConfig.loundspeakersnum }" class="layui-input">
			     </div>
			     
			 </div>
			 <div class="layui-form-item" style="width: 85%;padding-left: 200px;padding-top: 30px">
			    <div class="layui-input-block">
			      <button class="layui-btn" id='tjsub' lay-submit lay-filter="formDemo">立即提交</button>
		    	</div>
		  	</div>
		</form>
	</div>
 </div>
<script>

layui.use(['form'], function () {
    var $ = layui.jquery
        ,form = layui.form
        ,layer= layui.layer;
    
     var form = layui.form;
	  
	  //监听提交
	  form.on('submit(formDemo)', function(data){
		  var field = JSON.parse(JSON.stringify(data.field));
		  var img = field.img;
		  field.img = $("#imgAddress").val();
	  	//提交成功后禁用按钮
		$("#tjsub").css("pointer-events","none"); 
	    //layer.msg(JSON.stringify(data.field));
	    $.post("<%=basePath%>/controller/carDetailMediaConfig/save",field,function (data){
	    	if(data == '0'){
	    		$("#tjsub").css("pointer-events","auto");
	    		layer.msg('提交成功', {time:1000}); 
	    		setTimeout("window.location.reload();",1500); 
	    	}else{
	    		$("#tjsub").css("pointer-events","auto");
	    		layer.msg('提交失败', {time:1000}); 
	    	}
	    })
	    return false;
	  });
    
});

</script>
</body>
</html>
